<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>教师信息管理</title>
    <link rel="stylesheet" href="/css/layui.css">
    <link rel="stylesheet" href="/css/dp101.css">
    <script src="/js/jquery-3.7.1.min.js"></script>
</head>
<body>



<!--<div class="container">-->
<!--    <div class="layui-row">-->
<!--        <div class="layui-col-xs12">-->
<!--            <table class="layui-table" lay-even>-->
<!--                <thead>-->
<!--                <tr>-->
<!--                    <th>id</th>-->
<!--                    <th>姓名</th>-->
<!--                    <th>性别</th>-->
<!--                    <th>年龄</th>-->
<!--                    <th>学号</th>-->
<!--                </tr>-->
<!--                </thead>-->


<!--使用thymeleaf模板引擎：-->
<!--                <tr th:each="students :${students}">-->
<!--                    <td th:text="${students.id}"></td>-->
<!--                    <td th:text="${students.name}"></td>-->
<!--                    <td th:text="${students.sex == 1 ? '男' : (student.sex == 2 ? '女' : '未知')}"></td>-->
<!--                    <td th:text="${students.age}"></td>-->
<!--                    <td th:text="${students.sno}"></td>-->
<!--                </tr>-->


<!--                <tbody id="studentTb">-->

<!--                </tbody>-->
<!--            </table>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->

<div class="container">

    <div class="layui-row">
        <div class="layui-col-xs12">

            <h1 style="text-align: center">教师信息管理</h1>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-col-xs12 toolbar">

            <div class="layui-row">
                <button type="button" class="layui-btn layui-btn-sm layui-btn-normal"
                         onclick="showStudenDlg();return false;">

                <i class="layui-icon layui-icon-addition"></i>
            </button>

                <button type="button" class="layui-btn layui-btn-sm layui-btn-normal layui-bg-red"
                        onclick="deleteConfirm();" style="float: right;">

                    <i class="layui-icon layui-icon-delete"></i>
                </button>
            </div>

            <div class="queryBox">
                <form action="" class="layui-form" id="queryForm">
                    <ul class="query-inline">
                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                教师号
                            </div>
                            <input type="text" placeholder="教师号" class="layui-input" name="tno">

                        </li>
                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                姓名
                            </div>
                            <input type="text" placeholder="姓名" class="layui-input" name="name">

                        </li>
                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                年龄
                            </div>
                            <input type="text" placeholder="年龄" class="layui-input" name="age">

                        </li>
                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                性别
                            </div>
                            <select name="sex">
                                <option value="">请选择</option>
                                <option value="0">未知</option>
                                <option value="1">男</option>
                                <option value="2">女</option>
                            </select>

                        </li>
                        <li class="layui-input-group">
                            <button type="button" class="layui-btn layui-btn-normal"
                                    onclick="search();return false;" style="margin-left: 20px;">查询
                            </button>

                        </li>
                    </ul>
                </form>
            </div>

            <div class="layui-row">
                <div class="layui-col-xs12">

                    <table class="layui-hide" id="tbStudent" lay-filter="tbStudent"></table>

                </div>
            </div>

<!--            之前自写的查询-->
<!--            <div style="display:inline-block;width:50px;"></div> &lt;!&ndash; 间距 &ndash;&gt;-->

<!--            &lt;!&ndash; 搜索输入框和按钮 &ndash;&gt;-->
<!--            <div class="layui-inline">-->
<!--                <input type="text" id="searchName" placeholder="请输入姓名" class="layui-input">-->
<!--                <button class="layui-btn" id="searchBtn">查询</button>-->
<!--            </div>-->

<!--            <div style="display:inline-block;width:50px;"></div> &lt;!&ndash; 间距 &ndash;&gt;-->

<!--            &lt;!&ndash; 搜索输入框和按钮 &ndash;&gt;-->
<!--            <div class="layui-inline">-->
<!--                <input type="text" id="searchSno" placeholder="请输入教师号" class="layui-input">-->
<!--                <button class="layui-btn" id="searchSnoBtn">查询</button>-->
<!--            </div>-->

        </div>
    </div>
            <!-- 之前的学生信息表格 -->
<!--            <table class="layui-table" lay-even>-->
<!--                <thead>-->
<!--                <tr>-->
<!--                    <th>id</th>-->
<!--                    <th>姓名</th>-->
<!--                    <th>性别</th>-->
<!--                    <th>年龄</th>-->
<!--                    <th>教师号</th>-->
<!--                    <th>编辑</th>-->
<!--                </tr>-->
<!--                </thead>-->
<!--                <tbody id="studentTb">-->
<!--                </tbody>-->
<!--            </table>-->

</div>


<script type="text/html" id="editTemplate">
    <div class="layui-clear-space">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    </div>
</script>

<form class="layui-form dlgcontainer" id="studForm" style="display: none;">
    <div class="demo-reg-container">
        <div class="layui-form-item" id="formId">
            <div class="layui-row">
                <div class="layui-col-xs12">
                    <div class="layui-input-wrap">
                        <div class="layui-input-prefix">
                            <i class="layui-icon layui-icon-cellphone"></i>
                        </div>
                        <input type="text" name="id" value=""  placeholder="id" lay-reqtext="请填写id" autocomplete="off" class="layui-input" id="id">
                    </div>
                </div>

            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-wrap">
                <div class="layui-input-prefix">
                    <i class="layui-icon layui-icon-vercode"></i>
                </div>
                <input type="text" name="tno" value="" lay-verify="required" placeholder="教师号" lay-reqtext="请填写教师号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-wrap">
                <div class="layui-input-prefix">
                    <i class="layui-icon layui-icon-password"></i>
                </div>
                <input type="text" name="name" value="" lay-verify="required" placeholder="姓名" autocomplete="off" class="layui-input" id="name">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-wrap">
                <label class="layui-form-label">性别</label>

                <div class="layui-input-block">
                    <input type="radio" name="sex" value="1" title="男">
                    <input type="radio" name="sex" value="2" title="女">
                    <input type="radio" name="sex" value="0" title="未知" checked>
                </div>

            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-wrap">
                <div class="layui-input-prefix">
                    <i class="layui-icon layui-icon-username"></i>
                </div>
                <input type="text" name="age" value="" placeholder="年龄" autocomplete="off" class="layui-input" lay-affix="clear">
            </div>
        </div>

        <div class="layui-form-item">
            <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="stud-dlg" id="btnOK">确定</button>
        </div>

    </div>
</form>

<script src="/js/layui.js"></script>
<script src="/pagejs/dp101.js"></script>
</body>
</html>